import request from '@/utils/request';


export function listAllRange(){
  return request({
    url:"/dormitory/range/listAllRange",
    method:"GET"
  });
}


// 查询住宿区间列表
export function listRange(query) {
  return request({
    url: '/dormitory/range/list',
    method: 'get',
    params: query
  })
}

// 查询住宿区间详细
export function getRange(id) {
  return request({
    url: '/dormitory/range/' + id,
    method: 'get'
  })
}

// 新增住宿区间
export function addRange(data) {
  return request({
    url: '/dormitory/range/add',
    method: 'post',
    data: data
  })
}

// 修改住宿区间
export function updateRange(data) {
  return request({
    url: '/dormitory/range/update',
    method: 'post',
    data: data
  })
}

// 删除住宿区间
export function delRange(id) {
  return request({
    url: '/dormitory/range/' + id,
    method: 'post'
  })
}
